package nl.vu.few.ibivu.biomodels.client.event;

import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerRegistration;

public class ModelDrawnEvent extends GwtEvent<ModelDrawnEventHandler> {

	public static Type<ModelDrawnEventHandler> TYPE = new Type<ModelDrawnEventHandler>();


	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<ModelDrawnEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(ModelDrawnEventHandler handler) {
		handler.onDraw(this);
	}

	public static HandlerRegistration register(EventBus eventBus, ModelDrawnEventHandler handler) {
		return eventBus.addHandler(TYPE, handler);
	}

}
